Add mkcapabiltities.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 29 Jul 2005 17:07:57 +0000 (17:07 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 29 Jul 2005 17:07:57 +0000 (17:07 +0000)
gpsbabel/tools/mkcapabilities [new file with mode: 0755]

diff --git a/gpsbabel/tools/mkcapabilities b/gpsbabel/tools/mkcapabilities
new file mode 100755 (executable)
index 0000000..c7ef7fb
--- /dev/null
@@ -0,0 +1,27 @@
+./gpsbabel -^2 | 's/\&amp;/\&/'` | awk  -F'\t' '
+function getcap(type, cap, sname, lname) {
+       if (type == "internal") return
+       print "<tr>"
+       print "<td class=\"fmtline\">" lname "</td>"
+       print "<td class=\"c4\">" sname "</td>"
+       # This is bad...
+       
+       printf "<td class=\"c4\">"
+       if (sname == "geo") {
+               printf "<a href=\"/tips/browser.html\">Yes</a>"
+       } else if (sname == "s_and_t") {
+               printf "<a href=\"/formats/s_and_t/Importing_into_Microsoft_Streets_and_Trips_2003.html\">[1]</a><a href=\"http://www.gpsbabel.org/formats/s_and_t/TripPlanning.html\">[2]</a>"
+       }
+       print "</td>"
+
+
+       for (i = 1; i <= 6; i++) {
+               c = substr(cap, i, 1)
+               printf "<td class=\"cap\">"
+               if (c != ("-")) printf "yes"
+               printf "</td>\n"
+       }
+       print "</tr>"
+}
+getcap($1, $2, $3, $5)
+' > ../babelweb/capabilities.inc > ../babelweb/capabilities.inc